import request from '@/sheep/request';

interface MpliveApiParams {
  ids: string[];
}

interface MpliveApi {
  getRoomList: (ids: string[]) => Promise<any>;
  getMpLink: () => Promise<any>;
}

// TODO: 小程序直播还不支持
const mpliveApi: MpliveApi = {
  //小程序直播
  getRoomList: (ids: string[]): Promise<any> =>
    request({
      url: 'app/mplive/getRoomList',
      method: 'GET',
      params: {
        ids: ids.join(','),
      }
    }),
  getMpLink: (): Promise<any> =>
    request({
      url: 'app/mplive/getMpLink',
      method: 'GET'
    }),
};

export default mpliveApi;
